package com.motong.gongdan.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.motong.gongdan.entity.DeviceStatus;
import com.motong.gongdan.vo.system.device.query.StartupRateDashboardQuery;
import com.motong.gongdan.vo.system.device.query.StatusDashboardQuery;
import com.motong.gongdan.vo.system.device.query.StatusLogQuery;
import com.motong.gongdan.vo.system.device.vo.DeviceStatusRateVo;
import com.motong.gongdan.vo.system.device.vo.StartupRateDashboardVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeviceStatusMapper extends BaseMapper<DeviceStatus> {


    List<DeviceStatusRateVo> deviceStatusRate(@Param("query") StatusDashboardQuery query);

    // 获取需要查询的设备
    Page<StartupRateDashboardVo> getTopGreenRateDevice(Page<DeviceStatus> page, @Param("query") StartupRateDashboardQuery query);

    List<DeviceStatusRateVo> lampRateInfo(@Param("query") StatusDashboardQuery query);

    Page<DeviceStatus> statusLog(Page<DeviceStatus> page, @Param("query") StatusLogQuery query);

}